home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / gsdb25.zip / DB_XPL17.PAS < prev    next >
Pascal/Delphi Source File  |  1991-08-03  |  2KB  |  69 lines

  1. program DB_Xpl17;
  2. uses
  3.    CRT,
  4.    GS_KeyI,
  5.    GS_Winfc;
  6.  
  7. const
  8.    ColorChart : array[0..15] of string[12]
  9.                 = ('Black','Blue','Green','Cyan','Red','Magenta',
  10.                    'Brown','LightGray','DarkGray','LightBlue','LightGreen',
  11.                    'LightCyan','LightRed','LightMagenta','Yellow','White');
  12.  
  13. var
  14.    AskWin,
  15.    StatusWin,
  16.    WorkWin     : GS_Wind_Objt;
  17.    textnrml,
  18.    foregrnd,
  19.    backnrml,
  20.    texthilt,
  21.    backhilt    : byte;
  22.    x1,y1,x2,y2 : integer;
  23.  
  24. procedure ShowColors;
  25. begin
  26.    GS_Wind_GetColors(textnrml,backnrml,foregrnd,texthilt,backhilt);
  27.    GS_Wind_SetFgMode;
  28.    writeln('ForeGround Color is ',ColorChart[foregrnd]);
  29.    GS_Wind_SetIvMode;
  30.    writeln('Highlighted Text Color is ',ColorChart[texthilt]);
  31.    writeln('Highlighted BackGround Color is ',ColorChart[backhilt]);
  32.    GS_Wind_SetNmMode;
  33.    writeln('Normal Text Color is ',ColorChart[textnrml]);
  34.    writeln('Normal BackGround Color is ',ColorChart[backnrml]);
  35. end;
  36.  
  37. begin
  38.    ClrScr;
  39.    WorkWin.InitWin(1,1,80,19,White,Black,Yellow,Blue,LightGray,True,
  40.                        '[ COLOR INFORMATION ]',true);
  41.    AskWin.InitWin(20,8,60,12,Yellow,Blue,Yellow,Black,LightGray,true,
  42.                   '',true);
  43.    StatusWin.InitWin(1,20,80,25,Yellow,Red,Yellow,Red,LightGray,true,'',true);
  44.    WorkWin.SetWin;
  45.    GS_Wind_GetWinSize(x1,y1,x2,y2);
  46.    GotoXY(1,1);
  47.    writeln('Window size parameters are ',x1,',',y1,',',x2,',',y2);
  48.    writeln;
  49.    ShowColors;
  50.    GS_Wind_SetColors(Magenta,Cyan,Blue,Yellow,Green);
  51.    GS_Wind_SetNmMode;
  52.    writeln;
  53.    writeln('  Colors are now different');
  54.    writeln;
  55.    ShowColors;
  56.    StatusWin.NamWin('[ Labeling the Status Box ]');
  57.    StatusWin.SetWin;
  58.    AskWin.SetWin;
  59.    GoToXY(5,2);
  60.    write('Press any key to continue');
  61.    WaitForKey;
  62.    AskWin.RelWin;
  63.    GoToXY(5,2);
  64.    write('Press any key to exit');
  65.    WaitForKey;
  66.    StatusWin.RelWin;
  67.    WorkWin.RelWin;
  68. end.
  69.